<?xml version="1.0" encoding="utf-8" ?>
<taskrunner name="config" version="1.0" date="2008-10-30" maxthreads="1">

  <!-- 3pp compnents -->

  <includes>
    <file name="vida.install.settings.xml" />
  </includes>

  <tasks>

    <task name="fix.file.attributes" typename="@CommandLine">
      <description>
        removes the attribute read-only on all files in ${target.system.conf}
      </description>
      <dependencies list="copy.files"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.system.conf}"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>
    
    
    <task name="fix.configfile.attributes" typename="@CommandLine">
      <description>
        removes the attribute read-only on the dir ${target.application.dir}
      </description>
      <dependencies list="fix.file.attributes"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.application.dir}"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>
  
    <task name="restore.configuration" critical="false" condition="¤{KeepLocalDb}=true">
      <description>
        Copies configuration files from vidasave directory to the runtime directories.
        If one or more files fails to copy then the global property "restore.configuration.ok"
        will be set to false. 
      </description>
      <dependencies list="fix.configfile.attributes"/>
      <subtasks filename="vida.restore.configuration.xml"/>
    </task>
  
    <!--QC8422 2010-05-19: teriks28: let back the conditiopn for when showing VidaConfig-->
    <!--2011-06-09 : teriks28 : removed condition for when showing VidaConfig for VIDA2011C-->
    <!--2011-11-11: teriks28 : let back the condition for when showing VidaConfig for VIDA2012A-->
    <!--2012-10-29: teriks28 : removed condition for when showing VidaConfig for VIDA2013A-->
    <!--2013-01-22: teriks28 : let back the condition for when showing VidaConfig for VIDA2013B-->    
    <task name="start.vidaconfig.app" condition="¤{KeepLocalDb}=false OR ¤{restore.configuration.ok}=false" typename="@CommandLine">    
      <description>
        Starts the vida configuration application.
      </description>
      <dependencies list="restore.configuration[requireSuccess=false]"/>
      <parameters>
        <parameter name="filename" value="${target.vida.config.fullpath}"/>
        <parameter name="arguments" value="VidaHome=%{VIDA_HOME}"/>
      </parameters>
    </task>   
  </tasks>
</taskrunner>